﻿using Kanban.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Kanban.IDal
{
    public partial interface IBoardDal : IBaseDAL<Board>
    {
        /// <summary>
        /// 获取统计数量
        /// </summary>
        /// <returns></returns>
        Task<object> GetNum();
        Task<object> GetSystemInfo();

        /// <summary>
        /// 获取料架信息
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<object>> GetRacks();

        /// <summary>
        /// 获取入库报表
        /// </summary>
        /// <param name="search"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        Task<Tuple<IList<object>, int>> GetInPageData(string PKGID, string Location, string StoreCode, string SHELFTNO, string PN, string startTime, string endTime, int pageSize, int pageIndex, bool Qty = false);

        /// <summary>
        /// 获取出库报表
        /// </summary>
        /// <param name="search"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        Task<Tuple<IList<object>, int>> GetOutPageData(string TaskNo, string PKGID, string Location, string StoreCode, string SHELFTNO, string PN, string startTime, string endTime, int pageSize, int pageIndex);

        /// <summary>
        /// 获取任务报表
        /// </summary>
        /// <param name="search"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        Task<Tuple<IList<object>, int>> GetTaskPageData(string TaskNo, string PKGID, string Location, string StoreCode, string SHELFTNO, string PN, int pageSize, int pageIndex);

        /// <summary>
        /// 获取取消任务报表
        /// </summary>
        /// <param name="search"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        Task<Tuple<IList<object>, int>> GetTaskCancelPageData(string search, int pageSize, int pageIndex);

        /// <summary>
        /// 删除储位报表
        /// </summary>
        /// <param name="search"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        Task<Tuple<IList<object>, int>> GetWarehousePageData(string PKGID, string Location, string StoreCode, string SHELFTNO, string PN, int pageSize, int pageIndex);

        Task<IEnumerable<object>> GetSysStatus();

        Task<bool> UpdateRunStatus(bool status);

        Task<Tuple<bool, string>> DelTask(string taskNo);

        Task<Tuple<bool, string>> DelWarehouse(string serialNo);

        Task<Tuple<IList<object>, int>> GetLogPageData(string time, int pageSize, int pageIndex);

        Task<Tuple<IList<object>, int>> GetApiLogPageData(string time, int pageSize, int pageIndex);

        Task<IEnumerable<TaskModel>> GetTaskList(string ids);

        Task<Tuple<bool, string>> CompleteTask(string taskNo, string pkgId);

        Task<IEnumerable<object>> GetWarehouseWarnList();

        Task<IEnumerable<TotalModel>> GetInWarehouse4WMSTotal();

        Task<IEnumerable<TotalModel>> GetAPI_TASK_FINISHTotal();

        Task<IEnumerable<object>> GetAllTask();
    }
}
